CREATE TRIGGER autolink_rec_owner_readable AFTER INSERT ON record
BEGIN
INSERT INTO record_read_user VALUES(new.record_id,new.owner_id);
END;

CREATE TRIGGER autolink_rec_owner_writable AFTER INSERT ON record
BEGIN
INSERT INTO record_write_user VALUES(new.record_id,new.owner_id);
END;
